import configService from '@/api/config.js'

const useConfigStore = defineStore(
  'config',
  () => {
    const configData = ref({})

    function setConfigData() {
      configService.list().then((response) => {
        configData.value = response.data
      })
    }

    return {
      configData,
      setConfigData,
    }
  },
)

export default useConfigStore
